VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmConfig 
   BackColor       =   &H00000000&
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   4935
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   9360
   ForeColor       =   &H00000000&
   Icon            =   "Form2.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4935
   ScaleWidth      =   9360
   StartUpPosition =   2  'CenterScreen
   Begin MSComctlLib.TreeView trvMenu 
      Height          =   3735
      Left            =   120
      TabIndex        =   51
      Top             =   480
      Width           =   3495
      _ExtentX        =   6165
      _ExtentY        =   6588
      _Version        =   393217
      LineStyle       =   1
      Style           =   7
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Frame Panel1 
      BackColor       =   &H00000000&
      BorderStyle     =   0  'None
      Caption         =   "Frame6"
      ForeColor       =   &H00FFFFFF&
      Height          =   4575
      Left            =   3720
      TabIndex        =   9
      Top             =   0
      Width           =   5535
      Begin VB.Frame Frame10 
         BackColor       =   &H00000000&
         Caption         =   "Miscellaneous Settings"
         ForeColor       =   &H00FFFF00&
         Height          =   1500
         Left            =   2520
         TabIndex        =   48
         Top             =   2880
         Width           =   2895
         Begin VB.CheckBox chkPingSpoof 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00000000&
            Caption         =   "Use Ping Spoofer"
            ForeColor       =   &H0000FFFF&
            Height          =   255
            Left            =   120
            TabIndex        =   49
            Top             =   315
            Width           =   2655
         End
      End
      Begin VB.TextBox txtPing 
         BackColor       =   &H00800000&
         Enabled         =   0   'False
         ForeColor       =   &H00FFFFFF&
         Height          =   285
         Left            =   120
         TabIndex        =   46
         Top             =   4080
         Width           =   2295
      End
      Begin VB.TextBox txtPort 
         BackColor       =   &H00800000&
         ForeColor       =   &H00FFFFFF&
         Height          =   315
         Left            =   4800
         TabIndex        =   43
         Text            =   "4800"
         Top             =   720
         Width           =   615
      End
      Begin VB.ComboBox txtServer 
         BackColor       =   &H00800000&
         ForeColor       =   &H00FFFFFF&
         Height          =   315
         ItemData        =   "Form2.frx":0CCA
         Left            =   2520
         List            =   "Form2.frx":0CD7
         TabIndex        =   42
         Text            =   "VectorNet.No-Ip.org"
         Top             =   720
         Width           =   2175
      End
      Begin VB.TextBox txtBackChannel 
         Alignment       =   2  'Center
         BackColor       =   &H00800000&
         ForeColor       =   &H00FFFFFF&
         Height          =   285
         Left            =   120
         TabIndex        =   22
         Top             =   3390
         Width           =   2295
      End
      Begin VB.Frame Frame5 
         BackColor       =   &H00000000&
         Caption         =   "Bot Startup Settings"
         ForeColor       =   &H00FFFF00&
         Height          =   1620
         Left            =   2520
         TabIndex        =   19
         Top             =   1200
         Width           =   2895
         Begin VB.CheckBox chkShowSplash 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00000000&
            Caption         =   "Show Splash Screen"
            ForeColor       =   &H0000FFFF&
            Height          =   255
            Left            =   120
            TabIndex        =   50
            Top             =   960
            Value           =   1  'Checked
            Width           =   2055
         End
         Begin VB.CheckBox chkUpdates 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00000000&
            Caption         =   "Check for Updates"
            ForeColor       =   &H0000FFFF&
            Height          =   255
            Left            =   120
            TabIndex        =   24
            Top             =   720
            Width           =   2055
         End
         Begin VB.CheckBox chkMiniStartup 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00000000&
            Caption         =   "Minimize on startup"
            ForeColor       =   &H0000FFFF&
            Height          =   255
            Left            =   120
            TabIndex        =   21
            Top             =   480
            Width           =   2055
         End
         Begin VB.CheckBox chkConnectStartup 
            Alignment       =   1  'Right Justify
            BackColor       =   &H00000000&
            Caption         =   "Connect on startup"
            ForeColor       =   &H0000FFFF&
            Height          =   255
            Left            =   120
            TabIndex        =   20
            Top             =   240
            Width           =   2055
         End
      End
      Begin VB.TextBox txtTrigger 
         Alignment       =   2  'Center
         BackColor       =   &H00800000&
         ForeColor       =   &H00FFFFFF&
         Height          =   285
         Left            =   120
         TabIndex        =   13
         Top             =   1920
         Width           =   2295
      End
      Begin VB.TextBox txtHome 
         BackColor       =   &H00800000&
         ForeColor       =   &H00FFFFFF&
         Height          =   285
         Left            =   120
         TabIndex        =   12
         Top             =   2520
         Width           =   2295
      End
      Begin VB.TextBox txtPassword 
         BackColor       =   &H00800000&
         ForeColor       =   &H00FFFFFF&
         Height          =   285
         IMEMode         =   3  'DISABLE
         Left            =   120
         PasswordChar    =   "*"
         TabIndex        =   11
         Top             =   1320
         Width           =   2295
      End
      Begin VB.TextBox txtUsername 
         BackColor       =   &H00800000&
         ForeColor       =   &H00FFFFFF&
         Height          =   285
         Left            =   120
         TabIndex        =   10
         Top             =   720
         Width           =   2295
      End
      Begin VB.Line Line2 
         BorderColor     =   &H00FFFFFF&
         X1              =   120
         X2              =   2400
         Y1              =   3000
         Y2              =   3000
      End
      Begin VB.Label Label28 
         BackColor       =   &H00000000&
         Caption         =   "Ping spoof:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   47
         Top             =   3840
         Width           =   1095
      End
      Begin VB.Label Label5 
         BackColor       =   &H00000000&
         Caption         =   "IP/Host:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   2520
         TabIndex        =   45
         Top             =   480
         Width           =   855
      End
      Begin VB.Label Label6 
         BackColor       =   &H00000000&
         Caption         =   "Port:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   4680
         TabIndex        =   44
         Top             =   480
         Width           =   375
      End
      Begin VB.Label Label30 
         BackColor       =   &H00000000&
         Caption         =   "Backup Channel:"
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   23
         Top             =   3150
         Width           =   1575
      End
      Begin VB.Label Label8 
         BackColor       =   &H00000000&
         Caption         =   "Home Channel:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   18
         Top             =   2280
         Width           =   1335
      End
      Begin VB.Label Label14 
         BackColor       =   &H00000000&
         Caption         =   "Username:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   17
         Top             =   480
         Width           =   975
      End
      Begin VB.Label Label13 
         BackColor       =   &H00000000&
         Caption         =   "Password:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   16
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label Label7 
         BackColor       =   &H00000000&
         Caption         =   "Bot Trigger:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   15
         Top             =   1680
         Width           =   1215
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BackColor       =   &H00000000&
         Caption         =   ":: VectorNet Bot - - Bot / Account Settings ::"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   255
         Left            =   0
         TabIndex        =   14
         Top             =   0
         Width           =   4935
      End
      Begin VB.Line Line1 
         BorderColor     =   &H00FFFFFF&
         X1              =   0
         X2              =   5520
         Y1              =   4560
         Y2              =   4560
      End
      Begin VB.Line Line4 
         BorderColor     =   &H00FFFFFF&
         X1              =   0
         X2              =   0
         Y1              =   4560
         Y2              =   360
      End
      Begin VB.Line Line5 
         BorderColor     =   &H00FFFFFF&
         X1              =   0
         X2              =   5520
         Y1              =   360
         Y2              =   360
      End
      Begin VB.Line Line6 
         BorderColor     =   &H00FFFFFF&
         X1              =   5520
         X2              =   5520
         Y1              =   4560
         Y2              =   360
      End
   End
   Begin VB.Frame Frame6 
      BackColor       =   &H00000000&
      Caption         =   "Profile Options"
      ForeColor       =   &H00FFFF00&
      Height          =   690
      Left            =   120
      TabIndex        =   6
      Top             =   4185
      Width           =   3480
      Begin VB.CommandButton btnManage 
         Caption         =   "Profile Manager"
         Enabled         =   0   'False
         Height          =   435
         Left            =   1170
         TabIndex        =   52
         Top             =   195
         Width           =   1125
      End
      Begin VB.CommandButton btnAdd 
         Caption         =   "Add New Profile"
         Enabled         =   0   'False
         Height          =   420
         Left            =   60
         TabIndex        =   8
         Top             =   210
         Width           =   1080
      End
      Begin VB.CommandButton btnRemove 
         Caption         =   "Remove Profile"
         Enabled         =   0   'False
         Height          =   435
         Left            =   2325
         TabIndex        =   7
         Top             =   195
         Width           =   1095
      End
   End
   Begin VB.Frame Panel3 
      BackColor       =   &H00000000&
      BorderStyle     =   0  'None
      Caption         =   "Frame6"
      ForeColor       =   &H00FFFFFF&
      Height          =   4575
      Left            =   3720
      TabIndex        =   4
      Top             =   0
      Visible         =   0   'False
      Width           =   5535
      Begin VB.Frame Frame3 
         BackColor       =   &H00000000&
         Caption         =   "Idle Settings"
         ForeColor       =   &H00FFFF00&
         Height          =   1935
         Left            =   120
         TabIndex        =   28
         Top             =   2520
         Width           =   5295
         Begin VB.TextBox txtIdleVars 
            BackColor       =   &H00000000&
            ForeColor       =   &H0000FF00&
            Height          =   735
            Left            =   120
            Locked          =   -1  'True
            MultiLine       =   -1  'True
            ScrollBars      =   2  'Vertical
            TabIndex        =   41
            Top             =   1080
            Width           =   2655
         End
         Begin VB.Frame Frame11 
            BackColor       =   &H00000000&
            Caption         =   "Idle Options"
            ForeColor       =   &H00FFFF00&
            Height          =   975
            Left            =   2880
            TabIndex        =   38
            Top             =   840
            Width           =   2295
            Begin VB.CheckBox chkIdle 
               BackColor       =   &H00000000&
               Caption         =   "Idle is: off"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               ForeColor       =   &H0000FFFF&
               Height          =   375
               Left            =   120
               TabIndex        =   39
               Top             =   360
               Width           =   1335
            End
         End
         Begin VB.TextBox txtIdle 
            BackColor       =   &H00800000&
            Enabled         =   0   'False
            ForeColor       =   &H00FFFFFF&
            Height          =   285
            Left            =   120
            TabIndex        =   30
            Top             =   480
            Width           =   4335
         End
         Begin VB.TextBox txtIdleTime 
            BackColor       =   &H00800000&
            Enabled         =   0   'False
            ForeColor       =   &H00FFFFFF&
            Height          =   285
            Left            =   4560
            TabIndex        =   29
            Text            =   "0"
            ToolTipText     =   "Enter Minutes only!!"
            Top             =   480
            Width           =   615
         End
         Begin VB.Label Label19 
            BackColor       =   &H00000000&
            Caption         =   "Greet Variables:"
            ForeColor       =   &H0000FFFF&
            Height          =   255
            Left            =   120
            TabIndex        =   40
            Top             =   840
            Width           =   1215
         End
         Begin VB.Label Label3 
            BackColor       =   &H00000000&
            Caption         =   "Idle Message:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H0000FFFF&
            Height          =   255
            Left            =   120
            TabIndex        =   32
            Top             =   240
            Width           =   1335
         End
         Begin VB.Label Label23 
            BackColor       =   &H00000000&
            Caption         =   "Idle Time:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H0000FFFF&
            Height          =   255
            Left            =   4200
            TabIndex        =   31
            Top             =   240
            Width           =   855
         End
      End
      Begin VB.Frame Frame2 
         BackColor       =   &H00000000&
         Caption         =   "Greet Settings"
         ForeColor       =   &H00FFFF00&
         Height          =   2055
         Left            =   120
         TabIndex        =   25
         Top             =   480
         Width           =   5295
         Begin VB.Frame Frame7 
            BackColor       =   &H00000000&
            Caption         =   "Greet Options"
            ForeColor       =   &H00FFFF00&
            Height          =   1095
            Left            =   2880
            TabIndex        =   35
            Top             =   840
            Width           =   2295
            Begin VB.CheckBox chkGreet 
               BackColor       =   &H00000000&
               Caption         =   "Greet is: off"
               BeginProperty Font 
                  Name            =   "MS Sans Serif"
                  Size            =   8.25
                  Charset         =   0
                  Weight          =   700
                  Underline       =   0   'False
                  Italic          =   0   'False
                  Strikethrough   =   0   'False
               EndProperty
               ForeColor       =   &H0000FFFF&
               Height          =   255
               Left            =   120
               TabIndex        =   37
               Top             =   600
               Width           =   1335
            End
            Begin VB.CheckBox chkWhisperGreet 
               BackColor       =   &H00000000&
               Caption         =   "Whisper Greet Message"
               ForeColor       =   &H0000FFFF&
               Height          =   195
               Left            =   120
               TabIndex        =   36
               Top             =   360
               Width           =   2055
            End
         End
         Begin VB.TextBox txtGreetVars 
            BackColor       =   &H00000000&
            ForeColor       =   &H0000FF00&
            Height          =   855
            Left            =   120
            Locked          =   -1  'True
            MultiLine       =   -1  'True
            ScrollBars      =   2  'Vertical
            TabIndex        =   34
            Top             =   1080
            Width           =   2655
         End
         Begin VB.TextBox txtGreet 
            BackColor       =   &H00800000&
            Enabled         =   0   'False
            ForeColor       =   &H00FFFFFF&
            Height          =   285
            Left            =   120
            TabIndex        =   26
            Top             =   480
            Width           =   5055
         End
         Begin VB.Label Label18 
            BackColor       =   &H00000000&
            Caption         =   "Greet Variables:"
            ForeColor       =   &H0000FFFF&
            Height          =   255
            Left            =   120
            TabIndex        =   33
            Top             =   840
            Width           =   1215
         End
         Begin VB.Label Label2 
            BackColor       =   &H00000000&
            Caption         =   "Greet Message:"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H0000FFFF&
            Height          =   255
            Left            =   120
            TabIndex        =   27
            Top             =   240
            Width           =   1455
         End
      End
      Begin VB.Line Line14 
         BorderColor     =   &H00FFFFFF&
         X1              =   5520
         X2              =   5520
         Y1              =   4560
         Y2              =   360
      End
      Begin VB.Line Line13 
         BorderColor     =   &H00FFFFFF&
         X1              =   0
         X2              =   5520
         Y1              =   360
         Y2              =   360
      End
      Begin VB.Line Line8 
         BorderColor     =   &H00FFFFFF&
         X1              =   0
         X2              =   0
         Y1              =   4560
         Y2              =   360
      End
      Begin VB.Line Line7 
         BorderColor     =   &H00FFFFFF&
         X1              =   0
         X2              =   5520
         Y1              =   4560
         Y2              =   4560
      End
      Begin VB.Label Label39 
         Alignment       =   2  'Center
         BackColor       =   &H00000000&
         Caption         =   ":: VectorNet Bot - - Idle/Greet Settings ::"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   375
         Left            =   240
         TabIndex        =   5
         Top             =   0
         Width           =   4935
      End
   End
   Begin VB.ComboBox txtProfile 
      BackColor       =   &H00804000&
      Enabled         =   0   'False
      ForeColor       =   &H00FFFFFF&
      Height          =   315
      Left            =   105
      TabIndex        =   3
      Text            =   "[default profile]"
      Top             =   75
      Width           =   3495
   End
   Begin VB.CommandButton btnSetup 
      Caption         =   "&Step-By-Step Configuration"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   5580
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   4620
      Width           =   2655
   End
   Begin VB.CommandButton btnCancelConfig 
      Caption         =   "&Close"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   8280
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   4620
      Width           =   975
   End
   Begin VB.CommandButton save 
      Caption         =   "Apply and Cl&ose"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   3720
      MaskColor       =   &H00FFFFFF&
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   4620
      Width           =   1815
   End
End
Attribute VB_Name = "frmConfig"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Const GWL_STYLE = -16&
Private Const TVM_SETBKCOLOR = &H804000 '4381&
Private Const TVM_GETBKCOLOR = &H804000 '4383&
Private Const TVS_HASLINES = 2&
Private Const CLR_INVALID = &H804000 '&HFFFF

Private Declare Function OleTranslateColor Lib "oleaut32" _
                         (ByVal clr As OLE_COLOR, _
                          ByVal hPal As Long, _
                          dwRGB As Long) As Long

Private Sub btnCancelConfig_Click()

Unload Me

End Sub
Private Sub btnSetup_Click()

frmConfigSetup.Show

End Sub

Private Sub chkAntiSpam_Click()

If chkAntiSpam.Value = 1 Then
    chkAntiSpam.Caption = "Disable anti spam"
Else
    chkAntiSpam.Caption = "Enable anti spam"
End If

End Sub

Private Sub chkGreet_Click()
  
  If chkGreet.Value Then
    txtGreet.Enabled = True
    chkGreet.Caption = "Greet is: on"
  Else
    txtGreet.Enabled = False
    chkGreet.Caption = "Greet is: off"
  End If
  
End Sub

Private Sub chkIdle_Click()

  If chkIdle.Value Then
    chkIdle.Caption = "Idle is: on"
    txtIdle.Enabled = True
    txtIdleTime.Enabled = True
  Else
    chkIdle.Caption = "Idle is: off"
    txtIdle.Enabled = False
    txtIdleTime.Enabled = False
  End If
  
End Sub

Private Sub DBRemAll_Click()

frmUserDB.DBList.Clear

End Sub

Private Sub chkPingSpoof_Click()

    If chkPingSpoof.Value = 1 Then
        txtPing.Enabled = True
    Else
        txtPing.Enabled = False
    End If

End Sub

Private Sub Form_Load()

Dim nodx As Node

'Add root Node
Set nodx = trvMenu.Nodes.Add(, , "Root", "General Settings")
Set nodx = trvMenu.Nodes.Add(, , "Root2", "Other Settings")

'Create a child node under the root node
Set nodx = trvMenu.Nodes.Add("Root", tvwChild, "Child1", "Account Manager")
Set nodx = trvMenu.Nodes.Add("Root2", tvwChild, "Child2", "Idle/Greet Manager")

ChangeBackgroundColor trvMenu.hWnd, RGB(0, 255, 255)

nodx.EnsureVisible
trvMenu.Style = tvwTreelinesText
'trvMenu.BorderStyle = vbFixedSingle

Me.Caption = "VectorNet Bot v2.4 | By: Plugins -- Configuration"


    'Read the configuration file and put the values in there rightful places.
       txtUsername.text = ReadINI("Account", "Username", "Config.ini")
       txtPassword.text = ReadINI("Account", "Password", "Config.ini")
       txtServer.text = ReadINI("Server", "Host", "Config.ini")
       txtPort.text = ReadINI("Server", "Port", "Config.ini")
       txtHome.text = ReadINI("Extras", "Home Channel", "Config.ini")
       txtGreet.text = ReadINI("Extras", "Greet Message", "Config.ini")
       txtIdle.text = ReadINI("Extras", "Idle Message", "Config.ini")
       txtTrigger.text = ReadINI("Extras", "Bot Trigger", "Config.ini")
       chkGreet.Value = ReadINI("Extras", "Greet Status", "Config.ini")
       txtIdleTime.text = ReadINI("Extras", "Idle Time", "Config.ini")
       chkIdle.Value = ReadINI("Extras", "Idle Status", "Config.ini")
       
       If ReadINI("Extras", "Whisper Greet", "Config.ini") = vbNullString Then
          chkWhisperGreet.Value = 0
       Else
          chkWhisperGreet.Value = ReadINI("Extras", "Whisper Greet", "Config.ini")
       End If
       
       If ReadINI("Extras", "ConnectOnStartup", "Config.ini") = vbNullString Then
         chkConnectStartup.Value = 0
       Else
         chkConnectStartup.Value = ReadINI("Extras", "ConnectOnStartup", "Config.ini")
       End If
       
       If ReadINI("Extras", "MinimizeOnStartup", "Config.ini") = vbNullString Then
          chkMiniStartup.Value = 0
        Else
          chkMiniStartup.Value = ReadINI("Extras", "MinimizeOnStartup", "Config.ini")
       End If
       
       If ReadINI("Extras", "CheckUpdatesOnStartup", "Config.ini") = vbNullString Then
         chkUpdates.Value = 0
       Else
         chkUpdates.Value = ReadINI("Extras", "CheckUpdatesOnStartup", "Config.ini")
       End If
       
       If ReadINI("Advanced", "PingSpoof", "Config.ini") = vbNullString Then
         chkPingSpoof.Value = 0
       Else
         chkPingSpoof.Value = ReadINI("Advanced", "PingSpoof", "Config.ini")
       End If
       
       txtPing.text = ReadINI("Advanced", "CustomPing", "Config.ini")
       
       If ReadINI("Advanced", "ShowSplash", "Config.ini") = vbNullString Then
         chkShowSplash.Value = 0
       Else
         chkShowSplash.Value = ReadINI("Advanced", "ShowSplash", "Config.ini")
       End If
       
       If IsNumeric(ReadINI("Extras", "ConnectOnStartup", "Config.ini")) Then
           chkConnectStartup.Value = ReadINI("Extras", "ConnectOnStartup", "Config.ini")
       Else
           chkConnectStartup.Value = 0
       End If
       
       If IsNumeric(ReadINI("Extras", "MinimizeOnStartup", "Config.ini")) Then
         chkMiniStartup.Value = ReadINI("Extras", "MinimizeOnStartup", "Config.ini")
       Else
         chkMiniStartup.Value = 0
       End If
       
       If IsNumeric(ReadINI("Extras", "CheckUpdatesOnStartup", "Config.ini")) Then
         chkUpdates.Value = ReadINI("Extras", "CheckUpdatesOnStartup", "Config.ini")
       Else
         chkUpdates.Value = 0
       End If
        
      If IsNumeric(ReadINI("Advanced", "PingSpoof", "Config.ini")) Then
        chkPingSpoof.Value = ReadINI("Advanced", "PingSpoof", "Config.ini")
      Else
        chkPingSpoof.Value = 0
      End If
      
      If IsNumeric(ReadINI("Advanced", "ShowSplash", "Config.ini")) Then
        chkShowSplash.Value = ReadINI("Advanced", "ShowSplash", "Config.ini")
      Else
        chkShowSplash.Value = 0
      End If
     
     
     If txtServer.text = vbNullString Then
        txtServer.text = "VectorNet.no-ip.org"
     End If
     
     If txtPort.text = vbNullString Then
        txtPort.text = "4800"
     End If
     
     
  If chkIdle.Value = 1 Then
     chkIdle.Caption = "Idle is: on"
  Else
    chkIdle.Caption = "Idle is: off"
  End If
  
  If chkGreet.Value = 1 Then
    chkGreet.Caption = "Greet is: on"
  Else
    chkGreet.Caption = "Greet is: off"
  End If
  
  txtGreetVars.text = "%utj = User that joined" & vbNewLine & "%v = Bot version" & vbNewLine & "%me = Bot Username" & vbNewLine & "%c = Current channel" & vbNewLine & "%uct = User Client Type" & vbNewLine & "%up = Users Ping"
  txtIdleVars.text = "%v = Bot version" & vbNewLine & "%me = Bot Username" & vbNewLine & "%c = Current channel"
  
End Sub

Private Sub Form_Unload(Cancel As Integer)

'Write the configuration info to the files
  WriteINI "Account", "Username", txtUsername.text, "Config.ini"
  WriteINI "Account", "Password", txtPassword.text, "Config.ini"
  WriteINI "Server", "Host", txtServer.text, "Config.ini"
  WriteINI "Server", "Port", txtPort.text, "Config.ini"
  WriteINI "Extras", "Home Channel", txtHome.text, "Config.ini"
  WriteINI "Extras", "Greet Message", txtGreet.text, "Config.ini"
  WriteINI "Extras", "Idle Message", txtIdle.text, "Config.ini"
  WriteINI "Extras", "Bot Trigger", txtTrigger.text, "Config.ini"
  WriteINI "Extras", "Greet Status", chkGreet.Value, "Config.ini"
  WriteINI "Extras", "Idle Time", txtIdleTime.text, "Config.ini"
  WriteINI "Extras", "Idle Status", chkIdle.Value, "Config.ini"
  WriteINI "Extras", "ConnectOnStartup", chkConnectStartup, "Config.ini"
  WriteINI "Extras", "MinimizeOnStartup", chkMiniStartup, "Config.ini"
  WriteINI "Extras", "CheckUpdatesOnStartup", chkUpdates, "Config.ini"
  WriteINI "Extras", "Whisper Greet", chkWhisperGreet, "Config.ini"
  WriteINI "Advanced", "PingSpoof", chkPingSpoof, "Config.ini"
  WriteINI "Advanced", "CustomPing", txtPing.text, "Config.ini"
  WriteINI "Advanced", "ShowSplash", chkShowSplash, "Config.ini"

End Sub

Private Sub save_Click()

Dim GreetEnable As String
Dim GreetDisabled As String
Dim IdleEnabled As String
Dim IdleDisabled As String

'The idle and greet value (variables)
GreetEnabled = "1"
GreetDisabled = "2"
IdleEnabled = "1"
IdleDisabled = "2"

'Give the message config was saved.
    AddChat vbGray, "-- Configuration (Config.ini): ", vbGreen, "settings saved!"
    frmStatus.txtMainWindowAddChat.Caption = frmStatus.txtMainWindowAddChat.Caption + 1
    

'Now unload the form and send the unload procedure.
Unload Me

End Sub

Private Sub trvMenu_Click()

If trvMenu.SelectedItem = "Account Manager" Then
    panel1.Visible = True
    panel3.Visible = False
End If

If trvMenu.SelectedItem = "Idle/Greet Manager" Then
    panel3.Visible = True
    panel1.Visible = False
End If

End Sub

'******************************************************************
'*  TranslateColor
'*
'*  This function takes a VB color constant and translates it into
'*    its RGB equivalent.
'******************************************************************
Private Function TranslateColor(ByVal clrColor As OLE_COLOR, Optional hPalette As Long = 0) As Long

If OleTranslateColor(clrColor, hPalette, TranslateColor) Then
  TranslateColor = CLR_INVALID
End If

End Function
' Changes a window's background color using a
' series of API calls.
Private Sub ChangeBackgroundColor(ByVal hWnd As Long, ByVal longColor As Long)
Dim longStyle As Long

    ' Change color
    SendMessage hWnd, TVM_SETBKCOLOR, 0, ByVal TranslateColor(longColor)

    ' Reset style so lines display properly
    ' (for TreeView control only)
    longStyle = GetWindowLong(hWnd, GWL_STYLE)
    SetWindowLong hWnd, GWL_STYLE, _
        longStyle And (Not TVS_HASLINES)
    SetWindowLong hWnd, GWL_STYLE, longStyle
End Sub
